package com.supplychain.financial.parent.api;

import com.supplychain.financial.parent.entity.DO.RoleDO;
import com.supplychain.financial.parent.entity.DTO.CustomRole;
import com.supplychain.financial.parent.entity.DTO.PageDTO;
import com.supplychain.financial.parent.common.exception.CustomException;

import java.util.List;
import java.util.Map;

/**
 * Created by zhengchuan on 2017/3/27.
 */
public interface RoleService {

    String getRoleForSelect() throws CustomException;

    PageDTO<CustomRole> findUserByPage(Integer page, Integer pageSize, String sortedKey, String sortedValue, String filters) throws CustomException;

    RoleDO findRoleByRoleKey(String roleKey) throws CustomException;

    RoleDO findRoleByRoleName(String roleName) throws CustomException;

    void editRoleInfo(CustomRole role, String oper) throws CustomException;

    List<Map<String,Object>> getPrivilegesByRoleId(String roleId) throws CustomException;

    void roleAuthorization(String roleId, String[] checkedNode, String[] cancelCheckedNode) throws CustomException;

    List getRoleForList() throws CustomException;
}
